package com.heima.admin.controller.v1;

import com.heima.admin.service.LoginService;
import com.heima.model.admin.dtos.UserDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author feihao
 * @version 1.0
 * @date 2021/7/22 19:33
 */

@RestController
@RequestMapping("login")
public class LoginController implements com.heima.apis.admin.LoginController {

    @Autowired
    private LoginService loginService;

    @Override
    @PostMapping("in")
    public ResponseResult login(@RequestBody UserDto userDto) {
        return loginService.login(userDto);
    }
}
